const jwt = require('jsonwebtoken');

function jwtSign(data, suo, time) {
    return jwt.sign(data, suo, { expiresIn: time });
}

function jwtVerify(data,suo){
    try {
        return jwt.verify(data,suo)
    } catch (error) {
      return false
    }
}

module.exports = {
    jwtSign,
    jwtVerify
};